from PyQt4.QtCore import *
from PyQt4.QtGui import *

from qgis.core import *

from rhelpers import menus

from opgam import Ui_Dialog

class Dialog(QDialog, Ui_Dialog):
    def __init__(self, iface):
        QDialog.__init__(self)
        self.setupUi(self)
        self.layer = iface.mapCanvas().currentLayer()
        self.layerName.setText(self.layer.name())
        self.attrExpected.clear()
        self.attrObserved.clear()
        provider = self.layer.getDataProvider()
        fields = provider.fields()
        [self.attrExpected.addItem(x.name()) for x in fields.values()]
        [self.attrObserved.addItem(x.name()) for x in fields.values()]
        
        
